﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.Tools.INSVideoTool
{
    static class LoginClientFactory
    {
        public static ILoginClientStrategy CreateLoginClient(LoginClientStrategy loginClientStrategy)
        {
            if (loginClientStrategy == LoginClientStrategy.OnceWithSameInfo)
            {
                return new LoginClientOnceWithSameInfo();
            }
            else if (loginClientStrategy == LoginClientStrategy.AlwaysWithTimeOut)
            {
                return new LoginClientAlwaysWithTimeOut();
            }
            else if(loginClientStrategy == LoginClientStrategy.OnceWithTimeOut)
            {
                return new LoginClientOnceWithTimeOut();
            }
            else
            {
                return new LoginClientAlways();
            }
        }

        public static void ClearLoginClientInfo()
        {
            LoginClientOnceWithSameInfo.ClearLoginClientInfo();
            LoginClientOnceWithTimeOut.ClearLoginClientInfo();
        }
    }
}
